<!doctype html>
<html><!-- InstanceBegin template="/Templates/dwt.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>谋刻职业教育在线测评与学习平台</title>

<link rel="stylesheet" href="css/course.css"/>
<link rel="stylesheet" href="css/register-login.css"/>
<script src="js/jquery-1.8.0.min.js"></script>
<link rel="stylesheet" href="css/tab.css" media="screen">
<script src="js/jquery.tabs.js"></script>
<script src="js/mine.js"></script>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->

</head>

<body>

<div class="head" id="fixed">
	<div class="nav">
    	<span class="navimg"><a href="index.html"><img border="0" src="images/logo.png"></a></span>
        <ul class="nag">
        	<li><a href="courselist.html" class="link1 current">课程</a></li>
            <li><a href="articlelist.html" class="link1">资讯</a></li>
            <li><a href="teacherList.html" class="link1">讲师</a></li>
            <li><a href="exam_index.html" class="link1" target="_blank">题库</a></li>
            <li><a href="askarea.html" class="link1" target="_blank">问答</a></li>

        </ul>
        <span class="massage">
            <!--<span class="select">
        	<a href="#" class="sort">课程</a>
        	<input type="text" value="关键字"/>
            <a href="#" class="sellink"></a>
            <span class="sortext">
            	<p>课程</p>
                <p>题库</p>
                <p>讲师</p>
            </span>
        </span>-->
        	<!--未登录-->
        	<span class="exambtn_lore">
                 <a class="tkbtn tklog" href="login.html">登录</a>
                 <a class="tkbtn tkreg" href="register.html">注册</a>
            </span>
            <!--登录后-->
            <!--<div class="logined">
                <a href="mycourse.html"  onMouseOver="logmine()" style="width:70px" class="link2 he ico" target="_blank">sherley</a>
                <span id="lne" style="display:none" onMouseOut="logclose()" onMouseOver="logmine()">
                    <span style="background:#fff;">
                        <a href="mycourse.html" style="width:70px; display:block;" class="link2 he ico" target="_blank">sherley</a>
                    </span>
                    <div class="clearh"></div>
                    <ul class="logmine" >
                        <li><a class="link1" href="#">我的课程</a></li>
                        <li><a class="link1" href="#">我的题库</a></li>
                        <li><a class="link1" href="#">我的问答</a></li>
                        <li><a class="link1" href="#">退出</a></li>
                    </ul>
                </span>
            </div>-->

        </span>
    </div>
</div>
<!-- InstanceBeginEditable name="EditRegion1" -->
<div class="login" style="background:url(images/12.jpg) right center no-repeat #fff">
<h2>登录</h2>
<form style="width:600px">
<div id="app">
    <div>
        <p class="formrow">
        <label class="control-label" for="register_email">帐号</label>
        <input type="text" v-model="user.loginName" placeholder="   请输入用户名称">
        </p>
        <span class="text-danger"></span>
    </div>
    <div>
        <p class="formrow" >
        <label class="control-label" for="register_email">密码</label>
        <input type="password" v-model="user.loginPwd" placeholder="   请输入密码">
        </p>
    </div>
    <div class="loginbtn">
        <label><input type="checkbox"  checked="checked"> <span class="jzmm">记住密码</span> </label>&nbsp;&nbsp;
            <input type="button" value="登录" @click="login()" class="uploadbtn ub1" />
    </div>
    <div class="loginbtn lb">
       <a href="register.html" class="link-muted">还没有账号？立即免费注册</a>
    </div>
</div>
</form>
<div class="hezuologo">
    <span class="hezuo">使用合作网站账号登录</span>
    <div class="hezuoimg">
    <img src="images/hezuoqq.png" class="hzqq" title="QQ" width="40" height="40"/>
    <img src="images/hezuowb.png" class="hzwb" title="微博" width="40" height="40"/>
    </div>

  </div>
</div>
<!-- InstanceEndEditable -->


<div class="clearh"></div>
<div class="foot">
<div class="fcontainer">
      <div class="fwxwb">
	       <div class="fwxwb_1">
		       <span>关注微信</span><img width="95" alt="" src="images/num.png">
		   </div>
           <div>
               <span>关注微博</span><img width="95" alt="" src="images/wb.png">
		   </div>
      </div>
      <div class="fmenu">
	     <p><a href="#">关于我们</a> | <a href="#">联系我们</a> | <a href="#">优秀讲师</a> | <a href="#">帮助中心</a> | <a href="#">意见反馈</a> | <a href="#">加入我们</a></p>
      </div>
      <div class="copyright">
        <div><a href="/">谋刻网</a>所有&nbsp;晋ICP备12006957号-9</div>
      </div>
    </div>
</div>
<!--右侧浮动-->
<div class="rmbar">
	<span class="barico qq" style="position:relative">
	<div  class="showqq">
	   <p>官方客服QQ:<br>335049335</p>
	</div>
	</span>
	<span class="barico em" style="position:relative">
	  <img src="images/num.png" width="75" class="showem">
	</span>
	<span class="barico wb" style="position:relative">
	  <img src="images/wb.png" width="75" class="showwb">
	</span>
	<span class="barico top" id="top">置顶</span>
</div>
</body>
<script src="js/vue.js"></script>
<script src="js/axios.min.js"></script>
<script src="js/moment.js"></script>
<script type="text/javascript" src="js/md5.js"></script>
<!--引入 element-ui 的样式，-->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 必须先引入vue，  后使用element-ui -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
<!-- 引入element 的组件库-->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    var v=new Vue({
        el:"#app",//具体那个视图
        data:{//数据属性
            user:{
                loginName:'',
                loginPwd:''
            },
        },
        methods: {//函数
            login:function () {
                this.user.loginPwd = hex_md5(this.user.loginPwd)
                var url = window.location.search;
                var courseId = url.split("=")[1];
                //alert(courseId);
                if(courseId==null){
                    axios.post("/api/education-user/student/login",this.user).then((res)=>{
                        if(res.data.success){

                            //alert(res.data.message)
                            window.sessionStorage.setItem("user",JSON.stringify(res.data.result.user))
                            this.$message({
                                showClose: true,
                                message: res.data.message,
                                type: 'success'
                            });
                            window.sessionStorage.setItem("token",res.data.result.token)
                            window.location.href="index.html"
                        }else{
                            this.$message({
                                showClose: true,
                                message: res.data.message,
                                type: 'error'
                            });
                        }
                    })
                }else{
                    axios.post("/api/education-user/student/login",this.user).then((res)=>{
                        if(res.data.success){
                            this.$message({
                                showClose: true,
                                message: res.data.message,
                                type: 'success'
                            });
                            window.sessionStorage.setItem("user",JSON.stringify(res.data.result))
                            window.sessionStorage.setItem("token",res.data.result.token)
                            window.location.href="course/"+courseId+".html";
                        }else{
                            this.$message({
                                showClose: true,
                                message: res.data.message,
                                type: 'error'
                            });
                        }
                    })
                }


            }
        }
    })
</script>

<!-- InstanceEnd --></html>
